Skip to content

Shortcuts and User Intents not working when app is not in background #22970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

soner-yuksel
Copy link
Contributor

@soner-yuksel soner-yuksel commented Apr 8, 2024

The problem is continue user activity for scene is only ran If application is in background. So the shortcuts and intents that are only executes their actions in continue should be also ran inside scene willConnect after application presented browser.

To solve custom activity and intents should be executed on willConnectTo after browser is displayed too.

Resolves brave/brave-browser#37403

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  • Kill the application entirely
  • Run the Playlist shortcut
  • Check the playlist screen is presented after browser view controller is initiated
RPReplay_Final1712595136.MP4

@soner-yuksel soner-yuksel added CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-windows-x64 Do not run CI builds for Windows x64 labels Apr 8, 2024
@soner-yuksel soner-yuksel self-assigned this Apr 8, 2024
@soner-yuksel soner-yuksel requested a review from a team as a code owner April 8, 2024 17:26
@soner-yuksel soner-yuksel merged commit e4ecdb5 into master Apr 11, 2024
20 checks passed
@soner-yuksel soner-yuksel deleted the ios/bugfix/activity-action-external branch April 11, 2024 15:07
@github-actions github-actions bot added this to the 1.67.x - Nightly milestone Apr 11, 2024
@Uni-verse
Copy link
Contributor

Uni-verse commented Apr 26, 2024

Verified on iPad (7th Gen) running iOS 17.4.1 using Nightly version 1.67.44

Precondition:

Create shortcut for Playlist on home screen

  1. Start with fresh profile.
  2. Open Brave -> 3-dot menu -> Settings -> Siri shortcuts.
  3. Find and Tap on Open Playlist
  4. Press "Done" on Siri shortcut modal.
  5. Switch to Home Screen, open Shortcuts app
  6. Find Open Playlist in All Shortcuts section
  7. Tap on 3 dot options menu in the shortcut
  8. Tap on Open Playlist dropdown header
  9. Select Add to Home Screen

Using test plan in #22970 (comment)

  • Ensured shortcut is working after killing app.
  • Ensured shortcut is working when app is backgrounded.
  • Ensured there are no issues with using shortcuts from Brave app context menu on Home Screen.
RPReplay_Final1714156931.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-windows-x64 Do not run CI builds for Windows x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shortcuts and User Intents not working when app is not in background
3 participants